/*
 * FormAnalyzerInstance.cpp
 *
 *  Created on: 05/02/2009
 *      Author: Administrator
 */

#include <QFile>
#include <QTextStream>

#include "FormAnalyzerInstance.h"

FormAnalyzerInstance::FormAnalyzerInstance(QWidget* parent, const QString& filename)
: isNewV(true)
{
	layout = new QVBoxLayout;
	setLayout(layout);
	layout->setAlignment(Qt::AlignTop);
}

void FormAnalyzerInstance::load(void)
{

}

void FormAnalyzerInstance::loadTald(const QString& talf)
{
	QFile f(talf);
	f.open(QFile::ReadOnly);
	QTextStream s(&f);

	s >> sample;
	layout->addWidget(&sample);

	isNewV = false;
}

void FormAnalyzerInstance::save(void)
{

}

void FormAnalyzerInstance::saveAs(const QString& filename)
{

}

bool FormAnalyzerInstance::close(void)
{
	return true;
}

void FormAnalyzerInstance::selectReg(unsigned int index)
{

}

int FormAnalyzerInstance::numberOfRegisters()
{
	return 0;
}

void FormAnalyzerInstance::addRegister()
{

}

/*QTextStream& operator<<(QTextStream& s, FormAnalyzerRegister& r)
{
	return s;
}

QTextStream& operator>>(QTextStream& s, FormAnalyzerRegister& r)
{*/
	/*FormQuestion q;
	FormFillerField* f;

	while(!s.atEnd())
	{
		s >> q;
		f = new FormFillerField(q.getQuestion(), q.getType());
		r.fields.push_back(f);
		r.layout->addWidget(f);
	}*/

//	return s;
//}
